home *** CD-ROM | disk | FTP | other *** search
/ Amiga Aktuell / Amiga Aktuell.iso / libs / initstruct.h < prev    next >
C/C++ Source or Header  |  1996-09-05  |  1KB  |  46 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: initstruct.h,v 1.2 1996/08/01 17:41:30 digulla Exp $
  4.     $Log: initstruct.h,v $
  5.     Revision 1.2  1996/08/01 17:41:30  digulla
  6.     Added standard header for all files
  7.  
  8.     Desc:
  9.     Lang:
  10. */
  11. #ifndef _INITSTRUCT_H_
  12. #define _INITSTRUCT_H_
  13. #include "machine.h"
  14.  
  15. typedef BYTE type_B;
  16. typedef WORD type_W;
  17. typedef LONG type_L;
  18.  
  19. #define S_DEF(i,l) union                                                        \
  20.            {                                \
  21.              struct _##i { l } _l;                    \
  22.              char _s[(sizeof(struct _##i)+LONGALIGN-1)&~(LONGALIGN-1)]; \
  23.            } _##i
  24.  
  25.  
  26. #define CODE_B 0x20
  27. #define CODE_W 0x10
  28. #define CODE_L 0x00
  29.  
  30. #define S_CPY(i,n,t)      S_DEF(i,UBYTE _cmd; type_##t _data[(n)];)
  31. #define S_REP(i,n,t)      S_DEF(i,UBYTE _cmd; type_##t _data;)
  32. #define S_CPYO(i,n,t)     S_DEF(i,UBYTE _cmd; UBYTE _ofst; type_##t _data[(n)];)
  33. #define S_CPYO24(i,n,t)   S_DEF(i,ULONG _cmd; type_##t _data[(n)];)
  34. #define S_END(i)          UBYTE _##i
  35. #define I_CPY(n,t)        CODE_##t|((n)-1)
  36. #define I_REP(n,t)        0x40|CODE_##t|((n)-1)
  37. #define I_CPYO(n,t,o)     0x80|CODE_##t|((n)-1), (o)
  38. #if BIG_ENDIAN
  39. #define I_CPYO24(n,t,o)   (0xc0|CODE_##t|((n)-1))<<24|(o)
  40. #else
  41. #define I_CPYO24(n,t,o)   0xc0|CODE_##t|((n)-1)|(o)<<8
  42. #endif
  43. #define I_END()           0
  44.  
  45. #endif
  46.